Generalized SSL by Vts// Generalized SSL:
// This is the very first time the SSL indicator, whose acronym I ignore, is on Tradingview.
// It is based on moving averages of the highs and lows.
// Similar channel indicators can be found, whereas
// this one implements the persistency inside the channel, which is rather tricky.
// The green line is the base line which decides entries and exits, possibly with trailing stops.
// With respect to the original version, here one can play with different moving averages.
// The default settings are (10,SMA)
//
// Vitelot/Yanez/Vts March 2019
Поиск скриптов по запросу "Trailing stop"
Chandelier ExitThis is a redesign of the Chandelier Exit indicator. It removes stupid transitions between Chandelier Exit' states and highlights initial points for both lines.
This indicator was originally developed by Charles Le Beau and popularized by Dr. Alexander Elder in his book "Come Into My Trading Room: A Complete Guide to Trading" (2002).
In short, this is a trailing stop-loss based on the Average True Range (ATR).
Fisher Transform Multi-Timeframe Backtest (No Trailing)This is the Backtester without Trailing Stops
Credits to mortdiggiddy
Chandelier Exit V2 by fr3762 KIVANÇChandelier Exit Version 2 with two lines Long Stop and Short Stop
There is a Chandelier exit for long positions and one for short positions. The Chandelier Exit (long) hangs three ATR values below the 22-period high. This means it rises and falls as the period high and the ATR value changes. The Chandelier Exit for short positions is placed three ATR values above the 22-period low. The spreadsheet examples show sample calculations for both.
According to the theory, traders should exit long positions at either the highest high since entry minus 3 ATRs .
Similarly traders should exit short positions at either the lowest low since entry plus 3 ATRs .
Developed by Charles Le Beau and featured in Alexander Elder's books, the Chandelier Exit sets a trailing stop-loss based on the Average True Range (ATR). The indicator is designed to keep traders in a trend and prevent an early exit as long as the trend extends. Typically, the Chandelier Exit will be above prices during a downtrend and below prices during an uptrend.
The author, Chuck LeBeau explains: It lets "... profits run in the direction of a trend while still offering some protection against any reversal in trend."
The exit stop is placed at a multiple of average true ranges from the highest high or highest close since the entry of the trade.
Chandelier Exit will rise instantly whenever new highs are reached. As the highs get higher the stop moves up but it never moves downward.
The Chandelier Exit is mostly used to set a trailing stop-loss during a trend. Trends sometimes extend further than we anticipate and the Chandelier Exit can help traders ride the trend a little longer. Even though it is mostly used for stop-losses, the Chandelier Exit can also be used as a trend tool. A break above the Chandelier Exit (long) signals strength, while a break below the Chandelier Exit (short) signals weakness. Once a new trend begins, chartists can then use the corresponding Chandelier Exit to help define this trend.
Developer: Charles Le Beau
Here's the link to a complete list of all my indicators:
tr.tradingview.com
Şimdiye kadar paylaştığım indikatörlerin tam listesi için: tr.tradingview.com
Chandelier Exit by fr3762 KIVANÇChandelier Exit
Developed by Charles Le Beau and featured in Alexander Elder's books, the Chandelier Exit sets a trailing stop-loss based on the Average True Range (ATR). The indicator is designed to keep traders in a trend and prevent an early exit as long as the trend extends. Typically, the Chandelier Exit will be above prices during a downtrend and below prices during an uptrend.
The author, Chuck LeBeau explains: It lets "... profits run in the direction of a trend while still offering some protection against any reversal in trend."
According to the theory, traders should exit long positions at either the highest high since entry minus 3 ATRs .
Similarly traders should exit short positions at either the lowest low since entry plus 3 ATRs .
The exit stop is placed at a multiple of average true ranges from the highest high or highest close since the entry of the trade.
Chandelier Exit will rise instantly whenever new highs are reached. As the highs get higher the stop moves up but it never moves downward.
The Chandelier Exit is mostly used to set a trailing stop-loss during a trend. Trends sometimes extend further than we anticipate and the Chandelier Exit can help traders ride the trend a little longer. Even though it is mostly used for stop-losses, the Chandelier Exit can also be used as a trend tool. A break above the Chandelier Exit (long) signals strength, while a break below the Chandelier Exit (short) signals weakness. Once a new trend begins, chartists can then use the corresponding Chandelier Exit to help define this trend.
Developer: Charles Le Beau
Average True Range Trailing Stops
Choices of Alerts supported (mainly for free members with only one alert):
Long crossover : to inform when a long position is available
Short crossover: to inform when a long position is available
Long/Short crossover : to inform when any position is available
Binque's Stop Loss IndicatorBinque's Stop Loss Indicator is a great way to visualize a trailing stop loss based on a percent from the high. i.e. If the high was $10 of a trading day and your stop loss was set at 5% (percent) then your chart would show a small dot 5% below the high of the day. This is a great way to quickly see a trailing stock idea. Change the color to match your back ground. Adjust your trailing stop loss to fit your trading style.
Note: This indicator is calculated off of the daily high.
DayLow - Chart the Moving Average of the DAILY LOW PriceThis is a moving average of the Daily LOW Price over a short period of time (i.e. 3 day low moving average, etc...) Great for tracking trailing stops for a stock on an up swing.
Moving Average Cross and/or Bbands botHello TradingView and world!
This is one of our latest concepts for an actual bot builder. This script comes with a bunch of features that we're hoping will alleviate a lot of the stress and confusion around using and building strategies here on TV. Especially if the end-goal is to automate the strategies using Autoview.
This is a combination of 2 strategies, and gives you full control of each component within the script.
The 2 strategies are:
2 Moving Averages == if close is greater than moving average and moving average 1 is greater than moving average 2
Bolling Bands == if close is less than lower or greater than upper
Features / Settings included :
- Ability to change settings from a commodity market (default) to an altcoin or forex market.
- Backtest time period selector component
- Heiken Ashi Candles on/off
- Moving Average Strategy on/off
- Bollinger Bands Strategy on/off
- Both Moving Average settings can be adjusted
- Bollinger Bands length and multiplier can be adjusted.
- Pyramiding Greater Than, Equal To, or Less Than
- Trailing Stop with the ability to set a price in which the Trailing Stop activate
- Take Profit on/off and editable
- Stop Loss on/off and editable
- Margin Call on/off dependent on Leverage which is editable
- If pyramiding is used, the strategy will calculate and display your average on the chart
- Profit and Loss visuals added to the chart
You can watch a video here on how all the settings can be used and work together.
www.youtube.com
You can learn more about Autoview here:
autoview.with.pink
Get your invite and join us in slack here:
slack.with.pink
Average True Range Reversed Strategy Average True Range Trailing Stops Strategy, by Sylvain Vervoort
The related article is copyrighted material from Stocks & Commodities Jun 2009
Please, use it only for learning or paper trading. Do not for real trading.
JC_MacD_RSI_Candle_Strat_public//
// Author : Jacques CRETINON
// Last Version : V1.0 11-22-2016
//
// Risk disclaimer : Do not use this script in production environment. We assume no liability or responsibility for any damage to you, your computer, or your other property, due to the use of this script.
//
// Purpose of this script :
// 1- use same pine code for strategy or study script (with simple modifications)
// 2- be able to send alerts : enterlong, entershort, exitlong, exitshort, stoplosslong, stoplossshort, takeprofitlong, takeprofitshort in a study script like a strategy script should do
// 3- do not repaint (I HOPE)
//
// RoadMap :
// 1- manage : Trailing Stop Loss and Trailing Stop Loss offset
//
// I use this script :
// 1- with default value for XAUUSD, current chart resolution : 1mn, large timeframe : 15mn.
// 2- That's why I hard code MACD5 (5mn average), MACD15 (15mn average), MACD60 (1h average) ...
// 3- MACD, RSI (1mn and 15mn) and Candles info are my inputs to take any decisions
//
// I do not publish my enterLong, enterShort, exitLong and exitShort conditions (lines 204 to 207 are sample !) as they are not as perfect as I'd like. Fell free to use your own conditions :)
//
// Please, report me any bug, fell free to discuss and share. English is not my natural language, so be clement ;) Happy safe trading :)
Strategy Code Example - Risk Management*** THIS IS JUST AN EXAMPLE OF STRATEGY RISK MANAGEMENT CODE IMPLEMENTATION ***
For my own future reference, and for anyone else who needs it.
Pine script strategy code can be confusing and awkward, so I finally sat down and had a little think about it and put something together that actually works (i think...)
Code is commented where I felt might be necessary (pretty much everything..) and covers:
Take Profit
Stop Loss
Trailing Stop
Trailing Stop Offset
...and details how to handle the input values for these in a way that allows them to be disabled if set to 0, without breaking the strategy.exit functionality or requiring a silly amount of statement nesting.
Also shows how to use functions (or variables/series) to execute trade entries and exits.
Cheers!
CapnsSurferThis is a simple RMA Trend that may help you decide for SL or TP. Similar to CapnsBands this uses Donchian Channels.. but remember. Your Trade Your Money
Howto Read Capns Surfer - I will write more later
First of all this is NOT a BUY or SELL indicator. However with this you can define sweet spots for ENTRIES, or TRAILING STOPS and recognize the trend.
Sweetspots
Ichimoku-Hausky Trading systemThis is a indicator with some parts of the ichimoku and EMA. It's my first script so i have used other peoples script (Chris Moody and DavidR) as reference cause I really have no idea myself on how to script with pinescript.
Hope that is okay!
I use 20M timeframe but it should work with any timeframe! I have not tested this system much so I would really appreciate feedback and tips for better entries, settings etc..
Tenken-sen: green line
Kijun-sen: blue line
EMA: Purple
Rules:
Buy:
IF price crosses or bounce above Kijun-sen
THEN see if market has closed above EMA
IF Market has closed above EMA
THEN see if EMA is above Kijun-sen
IF EMA is above Kijun-sen
THEN buy and set trailing stop 5 pips below EMA
Sell:
IF price crosses or bounce below Kijun-sen
THEN see if market has closed below EMA
IF Market has closed below EMA
THEN see if EMA is below Kijun-sen
IF EMA is below Kijun-sen
THEN sell and set trailing stop 5 pips above EMA
QQEThe Metastock version of Quantative Qualitative Estimation with two trailing stop lines and more options
Yellow line can be hidden if its too many signals and expirement with the Slow/Fast Trailing stop lines.
SuperTrend BFThe SuperTrend overlay by Olivier Seban provides an excellent 'trailing stop' that can be used with any bar length for bullish or bearish moves. My preferred timeframe is weekly for capturing huge (Super) moves. For instance applying it to AAPL, this baby would have us reeling in a fivebagger over the course of three years. Patience and holding your nerve are key to trend following and I like to think of SuperTrend as a great big visual 'crutch' right there on the chart.
Essentially this is an average true range trailing stop, of which there are several versions available (eg see the Sylvain Vervoort version programmed by H Potter). SuperTrend differs by referring the stop back from the middle of the bar (High+Low)/2. This is similar to using the Vervoort with a tweak to the number of ATR's considered. At the end of the day its a matter of preference and what works best for you.
CM_Parabolic SAREnhanced Parabolic Sar
Simply Enhances Default Parabolic SAR by creating Two Color Options, One for UpTrend, Other for DownTrend
Ability To Turn On/Off The Up Trending Parabolic SAR, And The Down Trending Parabolic SAR
Great Indicator For Trailing Stops.
Momentum Trend & Ignition DashboardDescription
Rationale & Originality Traders often struggle with chart clutter, needing separate indicators for Moving Averages, Volume anomalies, and Fundamental stats (like 52-week highs or Float). This script solves this problem by creating a unified "Momentum Dashboard." It is not just a collection of averages; it is a purpose-built tool for Breakout and Trend Following strategies (such as CAN SLIM or VCP).
The uniqueness of this script lies in its "Confluence Logic": it allows a trader to instantly validate a setup by checking three pillars simultaneously without changing tabs:
Trend: Are the key MAs (20, 50, 100, 200) stacked correctly?
Ignition: Is there a "Power Play" (Big Price Move + Heavy Volume) occurring right now?
Stats: Is the stock near its 52-week high, and does it have a supportive Up/Down Volume Ratio?
How It Works (Detailed Calculations)
1. Custom Trend Ribbon (4x MA Mix):
The script plots 4 independent Moving Averages.
Innovation: Unlike standard inputs, each MA can be individually toggled between SMA (Simple) or EMA (Exponential). This allows traders to mix "Fast" trend lines (e.g., 10 or 20 EMA) with "Slow" institutional lines (e.g., 50 or 200 SMA) in one overlay.
2. "Purple Dot" Ignition Detection:
This features a custom detection algorithm for "Ignition Bars."
Logic: It compares the current candle's Close to the previous Close. If the move exceeds a user-defined threshold (default 5%) AND the Volume exceeds a fixed liquidity threshold (default 500k), a Purple Dot is plotted.
This filters out "low volume drift" and highlights true institutional participation.
3. Relative Volume (RVol) Engine:
Calculates the ratio of Current Volume to the 50-period SMA of Volume.
Visuals: If the ratio exceeds the user threshold (e.g., 1.5x average), the dashboard highlights the data, and optionally the chart bars, alerting the trader to unusual activity.
4. Statistical Dashboard (Data Panel):
Using request.security, the panel fetches daily timeframe data regardless of the chart view.
52-Week & 13-Week H/L: Calculates the percentage distance from these key levels to gauge overhead supply.
U/D Ratio: Calculates the sum of volume on "Up Days" vs. "Down Days" over 50 periods. A value > 1.0 suggests institutional accumulation.
Float %: (Stocks Only) Fetches financial data to show the percentage of shares available for trading.
How to Use This Script
This script is designed for Trend Following and Breakout Trading:
The Setup: Use the Data Panel to find stocks with a U/D Ratio > 1.0 and price within 15% of the 52-Week High.
The Trend: Ensure price is above the MA 2 (set to 50 SMA) and MA 4 (set to 200 SMA) to confirm a Stage 2 uptrend.
The Trigger: Watch for the Purple Dot.
If a Purple Dot appears as price breaks out of a consolidation (base), it confirms institutional buying.
Use the RVol panel to confirm that volume is at least 1.5x normal levels.
Risk Management: Use the MA 1 (set to 20 EMA) as a trailing stop-loss during strong trends.
Settings & Configuration
MAs: Fully adjustable Length and Type (SMA/EMA).
Big Move (Purple Dot): Adjust the % Move based on asset volatility (e.g., use 3% for Large Caps, 10% for Crypto).
Table: The data panel is fully dynamic. You can toggle specific rows (like Float or SMA distance) On/Off to save screen space, and position it anywhere on the chart.
Credits & References
The concept of Relative Volume (RVol) and U/D Ratio is derived from standard Volume Analysis used by William O'Neil.
The "Big Move" combined with Volume thresholds is based on standard Volume Spread Analysis (VSA) concepts regarding "Effort vs. Result."
Financial data fetch (Float) utilizes TradingView's built-in financial() library.
Ichimoku With GradingDescription:
This indicator is an enhanced version of the classic Ichimoku Kinko Hyo, designed to provide traders with an objective, quantitative assessment of trend strength. By breaking down the complex Ichimoku system into specific conditions, this script calculates a "Total Score" to help visualize the confluence of bullish or bearish signals.
How It Works
The core of this script is a 7-Point Grading System. Instead of relying on a single crossover, the script evaluates 7 distinct Ichimoku conditions simultaneously.
The Grading Criteria:
Tenkan > Kijun: Checks for the classic TK Cross (1 point if Bullish, -1 if Bearish).
Price vs TK/KJ: Checks if the Close is above both the Tenkan and Kijun (Bullish) or below both (Bearish).
Future Cloud: Analyzes the Kumo (Cloud) projected 26 bars ahead. If Senkou Span A > Senkou Span B, it is bullish.
Chikou Span: The Lagging Span validation. It compares the current Close to the Highs, Lows, and Cloud levels of 26 bars ago to ensure there are no obstacles.
Close > Tenkan: Checks immediate short-term momentum.
Close > Current Senkou Span A: Checks if price is above the current cloud's Span A.
Close > Current Senkou Span B: Checks if price is above the current cloud's Span B.
Total Score & Signals:
Maximum Score (+7): When all 7 conditions are met, a Green Triangle is plotted above the bar, indicating a strong trend confluence.
Minimum Score (-7): When all 7 conditions are negative, a Red Triangle is plotted below the bar.
Neutral/Mixed: Scores between -6 and +6 indicate a mixed trend or consolidation phase.
Dashboard Features
A table is displayed in the top-right corner to provide real-time data:
Score Breakdown: Shows the status of every individual metric (1 or -1).
Total Score: The sum of all metrics.
Distance to Tenkan %: This calculates the percentage distance between the Close and the Tenkan-sen.
Usage: Traders often use the Tenkan-sen as a trailing stop-loss level. This percentage helps gauge how extended the price is from the mean; a high percentage may indicate an overextended move, while a low percentage indicates a tight consolidation.
How to Use Ichimoku Lines
Beyond the grading system, this indicator plots the standard Ichimoku lines, which are powerful tools for price action analysis:
Support & Resistance: The Tenkan-sen (Conversion Line) and Kijun-sen (Base Line) act as dynamic support and resistance levels. In a strong trend, price will often respect the Tenkan-sen. In a moderate trend, it may pull back to the Kijun-sen before continuing.
The Kumo (Cloud): The edges of the current cloud (Senkou Span A and B) act as major support and resistance zones. A thick cloud represents strong S/R, while a thin cloud is easily broken.
Trend Identification: Generally, if the price is above the Cloud, the trend is bullish. If below, it is bearish. If the price is inside the Cloud, the market is considered to be in a noise/ranging zone.
Screenshots
1. Bitcoin Daily View:
Here you can see the dashboard in action. The grading system helps filter out noise by requiring all conditions to align before generating a signal.
2. Gold (XAUUSD) Example:
An example of a bearish confluence where the score hit -7, triggering a sell signal as the price broke through all Ichimoku support levels.
3. Euro (EURUSD) Mixed State:
This example shows a market in transition. While some metrics are positive (Green), others are negative (Red), resulting in a score of 4. This prevents premature entries during choppy market conditions.
Settings
Lengths: All Ichimoku periods (Tenkan, Kijun, Senkou B, Displacement) are fully customizable in the settings menu to fit your preferred timeframe or trading style (e.g., Doubled settings for crypto).
Disclaimer: This tool is for educational and informational purposes only. Past performance does not guarantee future results. Always manage your risk.
40 SMA Scaling StrategyThis trend-following strategy focuses on capturing momentum when price breaks above the 40-period Simple Moving Average (SMA) while utilizing a systematic scale-out (Take Profit) approach to lock in gains during extended runs.
Strategy Logic
Entry: Opens a Long position with 100% of current equity when the price closes above the 40 SMA. This ensures maximum capital efficiency at the start of a new perceived trend.
Scaling Take Profits: To reduce risk as the trade progresses, the strategy automatically closes 25% of the initial position for every 1% increase in price from the entry point.
Exit: The entire remaining position is closed immediately if the price closes below the 40 SMA, acting as a trailing stop that adapts to the moving average.
Key Features
Capital-Efficient: Starts with a full account allocation to maximize exposure to the initial breakout.
Systematic De-risking: By scaling out in 25% increments, the strategy banks profits early while leaving a portion of the trade active for potential "moon shots."
Trend-Following Exit: Uses a classic SMA filter to exit, aiming to stay in the trade as long as the medium-term trend remains bullish.
London Session + EMA 200 + UT BotCombined trading indicator featuring three powerful tools:🔵 London Session Box - Highlights the London trading session (0700-1600) with a customizable colored box to identify high-volume trading periods📈 EMA 200 - Exponential Moving Average for trend identification and dynamic support/resistance levels🎯 UT Bot - ATR-based trailing stop indicator with buy/sell signals and bar coloring for trend following
Session & ATR Trailing Stop mindedgean indicator that highlights the asian range where i look for the 15m fractal to be swept and then i trade in the opposite direction






















